// 导入封装好的axios
import request from '@/utils/request'

// 获取评论
export const getCommon = params => request({
  method: 'GET',
  url: '/app/v1_0/comments',
  params
})
// 对评论点赞
export const likeComments = target => request({
  method: 'POST',
  url: '/app/v1_0/comment/likings',
  data: {
    target
  }
})
// 取消对评论点赞
export const cancelLikeComments = target => request({
  method: 'DELETE',
  url: `/app/v1_0/comment/likings/${target}`
})
// 添加评论
export const addComments = data => request({
  method: 'POST',
  url: '/app/v1_0/comments',
  data
})
